package net.zjitc.lib.Share.volatile1;

public class Producer implements Runnable {
    ShareClass shareClass;

    public Producer(ShareClass shareClass) {
        this.shareClass = shareClass;
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            shareClass.product((int) (Math.random() * 100));
        }

    }
}
